<template>
  <Table v-model:data="tableData">
    <el-table-column prop="id" sortable desc label="ID" width="80"/>
    <el-table-column prop="ctime" sortable label="操作时间" width="180"/>
    <el-table-column prop="people" label="操作者"  width="140"/>
    <el-table-column prop="ip" label="IP"  width="200"/>
    <el-table-column prop="name" label="类型"  width="120"/>
    <el-table-column prop="desc" label="描述"/>
  </Table>
  <Pagination @change="ListLog" v-model:page="page"/>
</template>


<script lang="ts" setup>
import {onMounted, reactive, ref} from 'vue'
import {log} from "./log"

import Pagination from '@/components/common/Pagination.vue'
import Table from '@/components/common/Table.vue'


let page = reactive({"page":1,"size":15,"total":0})
const tableData = ref([])

onMounted(() => {
  ListLog()
})


const ListLog = async () => {
  var res = await log.List(page)
  tableData.value = res.data
  page.total = res.total
}

</script>

<style scoped lang="scss">
@import "@/styles/table_header.scss";


</style>
